﻿<UserControl x:Class="PocketBook.UI.View.Dialogs.AddOrUpdateIncomeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"            
             Width="500">
    <Grid>
        <TabControl  Name="tabControl" Style="{StaticResource BlueTabControl}" Foreground="Black">
            <TabItem Header="{Binding DisplayName}" Name="tabItem1">
                <Grid Margin="6,6,6,6">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="50" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.ColumnSpan="3" Margin="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="140" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" Grid.Column="0" Text="Name: " Style="{DynamicResource PocketBookLabel}"/>
                        <TextBox Grid.Column="1" Text="{Binding Name}" VerticalAlignment="Top" FontSize="14"/>

                        <TextBlock Grid.Row="1" Text="Amount: " Style="{DynamicResource PocketBookLabel}"/>
                        <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Amount, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"  VerticalAlignment="Top" FontSize="14"/>

                        <TextBlock Grid.Row="2" Text="Description: " Style="{DynamicResource PocketBookLabel}"/>
                        <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Description}" FontSize="14" VerticalAlignment="Top" Height="100" VerticalScrollBarVisibility="Visible" VerticalContentAlignment="Top" AcceptsReturn="True" Margin="0,0,0,6" TextWrapping="WrapWithOverflow"/>
                    </Grid>
                    <TextBlock Grid.ColumnSpan="3" Foreground="Black" VerticalAlignment="Bottom" HorizontalAlignment="Center" Text="{Binding Path=Message}" />
                    <Button Grid.Row="2" Grid.Column="1" Content="Save" HorizontalAlignment="Right" Height="25" Margin="6,6,0,6" VerticalAlignment="Bottom" Width="80"  Command="{Binding SaveCommand}"/>
                    <Button Grid.Row="2" Grid.Column="2" Content="Cancel" HorizontalAlignment="Right" Height="25" Margin="6,6,0,6" VerticalAlignment="Bottom" Width="80"  Command="{Binding CloseWinow}"/>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
